﻿<phone:PhoneApplicationPage 
    x:Class="CetWin.Views.SettingsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:ce="clr-namespace:Phone.Framework.CaliburnExtensions"
    xmlns:vm="clr-namespace:CetWin.ViewModels"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:cal="clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro"
                            SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">
    
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,0,0,0">
            <TextBlock x:Name="ApplicationTitle" Text="Settings" Style="{StaticResource PhoneTextNormalStyle}"/>
        </StackPanel>

        <!--ContentPanel - place additional content herecal:Message.Attach="[Event SelectionChanged] = [Action ChangePivot($this.SelectedIndex)]"-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0">
            <controls:Pivot x:Name="pivot"
                            SelectedIndex="{Binding SelectedPivotIndex,Mode=TwoWay,FallbackValue=-1}">
                <!--Pivot item one-->
                <controls:PivotItem Header="basic">
                    <ScrollViewer>
                    <StackPanel ce:CabiburnService.TypeWithDataContext="CetWin.ViewModels.CetWinSetting">
                        <toolkit:ListPicker Header="Search result count"
                                            SelectedItem="{Binding SearchResultCount,Mode=TwoWay}">
                            <sys:Int32>5</sys:Int32>
                            <sys:Int32>10</sys:Int32>
                            <sys:Int32>15</sys:Int32>
                        </toolkit:ListPicker>
                            <toolkit:ListPicker Header="Search priority"
                                                SelectedItem="{Binding SearchPriority,Mode=TwoWay}">
                                <sys:String>Normal</sys:String>
                                <sys:String>CET4</sys:String>
                                <sys:String>CET6</sys:String>
                            </toolkit:ListPicker>
                            <toolkit:ListPicker Header="Word template"
                                                SelectedItem="{Binding WordItemTemplate,Mode=TwoWay}">
                            <sys:String>Simple</sys:String>
                            <sys:String>Normal</sys:String>
                            <sys:String>Detailed</sys:String>
                        </toolkit:ListPicker>
                        <toolkit:ToggleSwitch Header="Case sensitive" Margin="0,12,0,0"
                                              IsChecked="{Binding IsCaseSensitive,Mode=TwoWay}" Width="479" />
                        <toolkit:ToggleSwitch Header="Auto network search"
                                              IsChecked="{Binding AutoNetworkSearch,Mode=TwoWay}" Width="479" />
                        <toolkit:ToggleSwitch Header="Auto spelling"
                                              IsChecked="{Binding AutoSpellWord,Mode=TwoWay}" Width="479"/>
                        <!--<TextBlock Text="AutoNetworkSearch must be Selected"></TextBlock>-->
                        <toolkit:ToggleSwitch Header="Show warning when exit"
                                              IsChecked="{Binding ShowWarnWhenExit,Mode=TwoWay}" Width="479"/>
                        </StackPanel>
                    </ScrollViewer>
                </controls:PivotItem>
               
                <!--Pivot item two-->
                <controls:PivotItem Header="net search">
                    <StackPanel ce:CabiburnService.TypeWithDataContext="CetWin.ViewModels.CetWinSetting">
                        <toolkit:ListPicker Header="Search Engine"
                                            SelectedItem="{Binding SearchEngine,Mode=TwoWay}">
                            <sys:String>youdao</sys:String>
                            <sys:String>iciba</sys:String>
                        </toolkit:ListPicker>
                    </StackPanel>
                </controls:PivotItem>
                <!--<controls:PivotItem Header="reminder">
                    <StackPanel ce:CabiburnService.TypeWithDataContext="CetWin.ViewModels.CetWinSetting">
                        <toolkit:ToggleSwitch Header="Enable Remind Notification"
                                              IsChecked="{Binding EnableRemindNotification,Mode=TwoWay}"/>
                        <toolkit:TimePicker Header="Remind Time"
                                            IsEnabled="{Binding EnableRemindNotification,Mode=TwoWay}"
                                            Value="{Binding RemindTime,Mode=TwoWay}"/>
                    </StackPanel>
                </controls:PivotItem>-->
            </controls:Pivot>
     
        </Grid>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->

</phone:PhoneApplicationPage>
